<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>用户管理</title>
    <script src="__STATIC__/Admin/js/jquery-1.8.2.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="__STATIC__/Admin/hdjs/hdjs.min.js" type="text/javascript" charset="utf-8"></script>
    <link rel="stylesheet" type="text/css" href="__STATIC__/Admin/hdjs/hdjs.css"/>
    <link rel="stylesheet" type="text/css" href="__STATIC__/Admin/bootstrap/css/bootstrap.min.css"/>
    <style type="text/css">
    	a:hover{
        	text-decoration: none;
        }
        .red{color: red;}
        .green{color: green;}
    </style>
</head>
<body>
<div class="wrap">
    <table class="hd-table hd-table-list">
        <thead>
   			<tr>
				<td width="100">用户id</td>
				<td>用户名</td>
				<td width="100">是否锁定</td>
				<td width="200">操作</td>
			</tr>
        </thead>
        <tbody>
        	<foreach from="$data" key="$k" value="$v">
			<tr>
				<td width="50">{$v.uid}</td>
				<td>{$v.username}</td>
				<td width="100">
					<if value="$v['is_Lock'] == 1">
	            		<span class="glyphicon glyphicon-ok green"></span>
	            		<else/>
	            		<span class="glyphicon glyphicon-remove red"></span>
	            	</if>
				</td>
				<td width="120">
					<a href="{|U:'is_lock',array('uid'=>$v['uid'])}" class="hd-btn hd-btn-primary hd-btn-sm">锁定</a>
					<a href="javascript:del_modal({$v.uid});" class="hd-btn hd-btn-danger hd-btn-sm">删除</a>
					<if value="$v['is_Lock'] == 1">
					<a href="{|U:'no_lock',array('uid'=>$v['uid'])}" class="hd-btn hd-btn-success hd-btn-xm">解锁</a>
					</if>
				</td>
			</tr>
			</foreach>
			<tr>
				<td colspan="20">
					<a href="{|U:'adduser'}" class="hd-btn hd-btn-primary hd-btn-sm">添加</a>
				</td>
			</tr>
        </tbody>
    </table>
    <div class="page_hdjob">
        
    </div>
</div>

</body>
<script type="text/javascript">
	function del_modal(uid){
		hd_modal({
            width: 400,//宽度
            height: 120,//高度
            title: '确认删除吗？',//标题
            content: '',//提示信息
            button: true,//显示按钮
            button_success: "确定",//确定按钮文字
            button_cancel: "取消",//关闭按钮文字
            timeout: 0,//自动关闭时间 0：不自动关闭
            shade: true,//背景遮罩
            shadeOpacity: 0.3,//背景透明度
            success: function () {//点击确定后的事件
				location.href='{|U:"del"}' + '&uid=' + uid;
            },
            cancel: function () {//点击关闭后的事件

            }
        });
	}	
</script>
</html>